home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / business / updates_and_patches / finalwriter3 / fwepspatches / install fw eps patch < prev    next >
Text File  |  1978-11-24  |  4KB  |  166 lines

  1. ; $VER: Install FW EPS patch 1.00 (20.2.95) © Manuel Lemos 1995
  2. ; Script to install a patch to FinalWriter Releases 1, 2 and 3 to let it render EPS files that use PostScript fonts.
  3.  
  4. (
  5.     set prompt-where$
  6.     "Please indicate where in disk was installed FinalWriter."
  7. )
  8. (
  9.     set help-where$
  10.     (
  11.         cat
  12.         "Please indicate where in disk was installed FinalWriter.\n\nThe "
  13.         "directory where FinalWriter was installed must contain sub-directory "
  14.         "named \"FWFiles\" with a file named \"init.ps\" in it.\n\n"
  15.     )
  16. )
  17. (
  18.     set init.ps-doesnt-exist$
  19.     (
  20.         cat
  21.         "Apparently the \"init.ps\" does not exist or is unreadable.\n\n"
  22.         "Being so, it is not possible to install this patch!\n\n"
  23.         "Sorry, please contact Softwood."
  24.     )
  25. )
  26. (
  27.     set FWFiles-not-here$
  28.     (
  29.         cat
  30.         "Apparently FinalWriter was not installed in this directory.\n\n"
  31.         "The directory where FinalWriter was installed has a sub-directory "
  32.         "named \"FWFiles\" in it."
  33.     )
  34. )
  35. (
  36.     set patch-is-already-installed$ "Apparently the patch was already installed."
  37. )
  38. (
  39.     set unknown-version$ "An unknown version of the \"init.ps\" is installed!\n\n"
  40. )
  41. (
  42.     set changed-version$
  43.     (
  44.         cat
  45.         "If you have edited the file or somehow it was changed, please restore "
  46.         "the original file from the original installation disks.\n\n"
  47.         "NOTE:  Keep in mind that this patch only applies to FinalWriter "
  48.         "Release 1, 2 or 3."
  49.     )
  50. )
  51. (
  52.     set prompt-release$ "Which Release of FinalWriter do you have installed?"
  53. )
  54. (
  55.     set help-release$
  56.     (
  57.         cat 
  58.         "This patch only applies to FinalWriter Release 1, 2 or 3.  Please "
  59.         "specify the Release you have installed.\n\n"
  60.         "If you don't have any of these versions properly installed, this patch "
  61.         "is useless for you.\n\n"
  62.     )
  63. )
  64. (
  65.     set wrong-version$
  66.     (
  67.         cat
  68.         "Apparently you don't have installed the Release of FinalWriter that "
  69.         "you have specified!\n\n"
  70.         "Please specify again which Release you have installed.\n\n"
  71.     )
  72. )
  73. (set source$ (expandpath ""))
  74. (set FinalWriter$ (tackon @default-dest "FinalWriter"))
  75. (set destination$ "")
  76. (
  77.     until (AND (<> "" destination$) (exists destination$))
  78.     (
  79.         (
  80.             set FinalWriter$
  81.             (
  82.                 askdir
  83.                     (prompt prompt-where$)
  84.                     (help (cat help-where$ @askoptions-help))
  85.                     (default FinalWriter$)
  86.                     (disk)
  87.             )
  88.         )
  89.         (set destination$ (tackon FinalWriter$ "FWFiles"))
  90.         (
  91.             if (exists destination$)
  92.             (
  93.                 (
  94.                     if (= 0 (exists (tackon destination$ "init.ps")))
  95.                     (
  96.                         abort init.ps-doesnt-exist$
  97.                     )
  98.                 )
  99.             )
  100.             (
  101.                 message FWFiles-not-here$
  102.             )
  103.         )
  104.     )
  105. )
  106. (set @default-dest destination$)
  107. (set destination$ (tackon destination$ "init.ps"))
  108. (set filesize (getsize destination$))
  109. (
  110.     if (= filesize 5993)
  111.     (
  112.         (
  113.             copyfiles
  114.             (source destination$)
  115.             (dest @default-dest)
  116.             (newname "init.ps.old")
  117.         )
  118.         (set result 1)
  119.         (set release 0)
  120.         (
  121.             until (= 0 result)
  122.             (
  123.                 (
  124.                     if
  125.                     (= 0
  126.                         (
  127.                             set release
  128.                             (
  129.                                 askchoice
  130.                                 (prompt prompt-release$)
  131.                                 (help (cat help-release$ @askchoice-help))
  132.                                 (choices "Release 1 or 2" "Release 3")
  133.                                 (default release)
  134.                             )
  135.                         )
  136.                     )
  137.                     (
  138.                         set patch$ "FinalWriter1_2-init.ps.pch"
  139.                     )
  140.                     (
  141.                         set patch$ "FinalWriter3-init.ps.pch"
  142.                     )
  143.                 )
  144.                 (set patch$ (tackon source$ patch$))
  145.                 (set spatch$ (tackon source$ "spatch"))
  146.                 (set result (run ("\"%s\" \"-p%s\" \"-o%s\" \"%s\"" spatch$ patch$ destination$ (tackon @default-dest "init.ps.old"))))
  147.                 (
  148.                     if (<> 0 result)
  149.                     (
  150.                         message wrong-version$ changed-version$
  151.                     )
  152.                 )
  153.             )
  154.         )
  155.     )
  156.     (
  157.         if (= filesize 6215)
  158.         (
  159.             abort patch-is-already-installed$
  160.         )
  161.         (
  162.             abort unknown-version$ changed-version$
  163.         )
  164.     )
  165. )
  166.